// import request from "@/utils/request";

// const NOTICE_BASE_URL = "/api/v1/waring";

const WaringAPI = {
  /** 获取我的通知分页列表 */
  getTodoWaringList(queryParams?: WaringPageQuery) {
    console.log(queryParams);
    // return request<any, PageResult<WaringModel[]>>({
    //   url: `${NOTICE_BASE_URL}/page`,
    //   method: "get",
    //   params: queryParams,
    // });

    return new Promise((resolve) => {
      resolve({
        list: [
          {
            id: 10,
            name: "陈某某",
            mobile: "133****2343",
            deviceId: 2,
            eventType: "警告",
            eventName: "煤气泄漏",
            content: "发现煤气泄漏请尽快关闭煤气阀门。",
            statusText: "待处理",
            createTime: "2024-09-30 17:30",
          },

          {
            id: 11,
            name: "陈某某",
            mobile: "133****2343",
            deviceId: 2,
            eventType: "警告",
            eventName: "煤气泄漏",
            content: "发现煤气泄漏请尽快关闭煤气阀门。",
            statusText: "待处理",
            createTime: "2024-09-30 17:30",
          },

          {
            id: 12,
            name: "陈某某",
            mobile: "133****2343",
            deviceId: 2,
            eventType: "警告",
            eventName: "煤气泄漏",
            content: "发现煤气泄漏请尽快关闭煤气阀门。",
            statusText: "待处理",
            createTime: "2024-09-30 17:30",
          },

          {
            id: 13,
            name: "陈某某",
            mobile: "133****2343",
            deviceId: 2,
            eventType: "警告",
            eventName: "煤气泄漏",
            content: "发现煤气泄漏请尽快关闭煤气阀门。",
            statusText: "待处理",
            createTime: "2024-09-30 17:30",
          },

          {
            id: 15,
            name: "陈某某",
            mobile: "133****2343",
            deviceId: 2,
            eventType: "警告",
            eventName: "煤气泄漏",
            content: "发现煤气泄漏请尽快关闭煤气阀门。",
            statusText: "待处理",
            createTime: "2024-09-30 17:30",
          },
        ],
        total: 10,
        currentPage: 1,
        pageSize: 10,
      });
    });
  },
};

export default WaringAPI;

/** 通知公告分页查询参数 */
export interface WaringPageQuery extends PageQuery {}

/** 通知公告分页对象 */
export interface WaringModel {
  id: number; // 通知ID
  name: string; // 姓名
  mobile: string; // 手机号
  deviceId: number; // 设备ID
  eventType: string; // 事件类型
  eventName: string; // 事件名称
  content: string; // 事件内容
  statusText: string; // 状态文本
  createTime: string; // 创建时间
}
